inherited frmMeterMount: TfrmMeterMount
  Left = 746
  Top = 452
  VertScrollBar.Range = 0
  AutoSize = True
  BorderStyle = bsDialog
  Caption = #1059#1089#1090#1072#1085#1086#1074#1082#1072' '#1089#1095#1077#1090#1095#1080#1082#1072
  ClientHeight = 401
  ClientWidth = 340
  OldCreateOrder = True
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  inherited Panel1: TPanel
    Top = 374
    Width = 340
    Align = alTop
    inherited BitBtn1: TBitBtn
      Left = 140
    end
    inherited BitBtn2: TBitBtn
      Left = 242
    end
  end
  inherited ToolBar1: TToolBar
    Top = 401
    Width = 340
    Height = 0
  end
  object GroupBox1: TGroupBox [2]
    Left = 0
    Top = 0
    Width = 340
    Height = 66
    Align = alTop
    Caption = ' '#1044#1086#1075#1086#1074#1086#1088' '
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -11
    Font.Name = 'MS Sans Serif'
    Font.Style = [fsBold]
    ParentFont = False
    TabOrder = 2
    object Label1: TLabel
      Left = 20
      Top = 20
      Width = 31
      Height = 13
      Caption = #1040#1076#1088#1077#1089
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
    end
    object Label2: TLabel
      Left = 15
      Top = 44
      Width = 36
      Height = 13
      Caption = #1059#1089#1083#1091#1075#1072
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
    end
    object DBText1: TDBText
      Left = 56
      Top = 20
      Width = 280
      Height = 17
      DataField = 'ADDRESS'
      DataSource = dscServName
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = [fsBold, fsUnderline]
      ParentFont = False
    end
    object DBText2: TDBText
      Left = 56
      Top = 44
      Width = 280
      Height = 17
      DataField = 'SERVICE_NAME'
      DataSource = dscServName
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = [fsBold, fsUnderline]
      ParentFont = False
    end
  end
  object GroupBox2: TGroupBox [3]
    Left = 0
    Top = 66
    Width = 340
    Height = 189
    Align = alTop
    Caption = ' '#1057#1095#1077#1090#1095#1080#1082' '
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -11
    Font.Name = 'MS Sans Serif'
    Font.Style = [fsBold]
    ParentFont = False
    TabOrder = 3
    object Label3: TLabel
      Left = 11
      Top = 20
      Width = 126
      Height = 13
      Alignment = taRightJustify
      AutoSize = False
      Caption = #1058#1080#1087' '#1089#1095#1077#1090#1095#1080#1082#1072
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
    end
    object Label4: TLabel
      Left = 11
      Top = 44
      Width = 126
      Height = 13
      Alignment = taRightJustify
      AutoSize = False
      Caption = #1047#1072#1074#1086#1076#1089#1082#1086#1081' '#1085#1086#1084#1077#1088
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
    end
    object Label8: TLabel
      Left = 11
      Top = 68
      Width = 126
      Height = 13
      Alignment = taRightJustify
      AutoSize = False
      Caption = #1044#1072#1090#1072' '#1075#1086#1089#1087#1086#1074#1077#1088#1082#1080
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
    end
    object Label10: TLabel
      Left = 11
      Top = 92
      Width = 126
      Height = 13
      Alignment = taRightJustify
      AutoSize = False
      Caption = #1044#1072#1090#1072' '#1080#1079#1075#1086#1090#1086#1074#1083'.'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
    end
    object Label9: TLabel
      Left = 11
      Top = 115
      Width = 126
      Height = 13
      Alignment = taRightJustify
      AutoSize = False
      Caption = #1052#1077#1089#1090#1086' '#1091#1089#1090#1072#1085#1086#1074#1082#1080
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
    end
    object Label12: TLabel
      Left = 11
      Top = 138
      Width = 126
      Height = 13
      Alignment = taRightJustify
      AutoSize = False
      Caption = #1053#1072#1087#1088#1072#1074#1083#1077#1085#1080#1077' '#1074#1082#1083#1102#1095#1077#1085#1080#1103
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
    end
    object Label13: TLabel
      Left = 11
      Top = 163
      Width = 126
      Height = 13
      Alignment = taRightJustify
      AutoSize = False
      Caption = #1050#1086#1101#1092'. '#1090#1088#1072#1085#1089#1092#1086#1088#1084#1072#1094#1080#1080
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
    end
    object lcbMeterType: TDBLookupComboboxEh
      Left = 144
      Top = 16
      Width = 121
      Height = 19
      AlwaysShowBorder = True
      EditButton.Width = 16
      EditButtons = <>
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      Flat = True
      KeyField = 'ID'
      ListField = 'NAME'
      ListSource = dscMeterTypes
      ParentFont = False
      TabOrder = 0
      Visible = True
    end
    object dbeMeterNum: TDBEditEh
      Left = 144
      Top = 40
      Width = 121
      Height = 19
      AlwaysShowBorder = True
      EditButtons = <>
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      Flat = True
      ParentFont = False
      TabOrder = 1
      Visible = True
    end
    object dbtVerifyDate: TDBDateTimeEditEh
      Left = 144
      Top = 64
      Width = 121
      Height = 19
      AlwaysShowBorder = True
      EditButton.Width = 16
      EditButtons = <>
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      Flat = True
      Kind = dtkDateEh
      ParentFont = False
      TabOrder = 2
      Visible = True
    end
    object dbtManfDate: TDBDateTimeEditEh
      Left = 144
      Top = 88
      Width = 121
      Height = 19
      AlwaysShowBorder = True
      EditButton.Width = 16
      EditButtons = <>
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      Flat = True
      Kind = dtkDateEh
      ParentFont = False
      TabOrder = 3
      Visible = True
    end
    object cbDirection: TDBComboBoxEh
      Left = 144
      Top = 136
      Width = 121
      Height = 19
      AlwaysShowBorder = True
      EditButtons = <>
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      Flat = True
      Items.Strings = (
        #1055#1088#1103#1084#1086#1077
        #1054#1073#1088#1072#1090#1085#1086#1077)
      KeyItems.Strings = (
        '1'
        '-1')
      ParentFont = False
      TabOrder = 4
      Visible = True
    end
    object dbnK_trans: TDBNumberEditEh
      Left = 144
      Top = 160
      Width = 121
      Height = 19
      AlwaysShowBorder = True
      EditButtons = <>
      Flat = True
      MinValue = 1.000000000000000000
      TabOrder = 5
      Visible = True
    end
    object dbeMeterName: TDBComboBoxEh
      Left = 144
      Top = 112
      Width = 121
      Height = 19
      AlwaysShowBorder = True
      DropDownBox.Sizable = True
      EditButtons = <>
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      Flat = True
      ParentFont = False
      TabOrder = 6
      Visible = True
    end
  end
  object GroupBox3: TGroupBox [4]
    Left = 0
    Top = 255
    Width = 340
    Height = 119
    Align = alTop
    Caption = ' '#1059#1089#1090#1072#1085#1086#1074#1082#1072' '
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -11
    Font.Name = 'MS Sans Serif'
    Font.Style = [fsBold]
    ParentFont = False
    TabOrder = 4
    object Label5: TLabel
      Left = 11
      Top = 16
      Width = 126
      Height = 13
      Alignment = taRightJustify
      AutoSize = False
      Caption = #1044#1072#1090#1072' '#1091#1089#1090#1072#1085#1086#1074#1082#1080
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
    end
    object Label6: TLabel
      Left = 11
      Top = 40
      Width = 126
      Height = 13
      Alignment = taRightJustify
      AutoSize = False
      Caption = #1055#1086#1082#1072#1079#1072#1085#1080#1103
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
    end
    object Label7: TLabel
      Left = 11
      Top = 64
      Width = 126
      Height = 13
      Alignment = taRightJustify
      AutoSize = False
      Caption = #1050#1086#1085#1090#1088#1086#1083#1077#1088
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
    end
    object Label11: TLabel
      Left = 11
      Top = 88
      Width = 126
      Height = 13
      Alignment = taRightJustify
      AutoSize = False
      Caption = #1055#1083#1072#1085#1086#1074#1072#1103' '#1079#1072#1084#1077#1085#1072
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
      Visible = False
    end
    object dbtMountDate: TDBDateTimeEditEh
      Left = 144
      Top = 12
      Width = 121
      Height = 19
      AlwaysShowBorder = True
      EditButton.Width = 16
      EditButtons = <>
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      Flat = True
      Kind = dtkDateEh
      ParentFont = False
      TabOrder = 0
      Visible = True
    end
    object dbePH: TDBNumberEditEh
      Left = 144
      Top = 36
      Width = 121
      Height = 19
      AlwaysShowBorder = True
      EditButtons = <
        item
          Style = ebsMinusEh
          Width = 16
          OnClick = DBNumberEditEh1EditButtons0Click
        end
        item
          Style = ebsPlusEh
          Width = 16
          OnClick = DBNumberEditEh1EditButtons1Click
        end>
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      Flat = True
      ParentFont = False
      TabOrder = 1
      Visible = True
    end
    object lcbControler: TDBLookupComboboxEh
      Left = 144
      Top = 60
      Width = 121
      Height = 19
      AlwaysShowBorder = True
      EditButton.Width = 16
      EditButtons = <>
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      Flat = True
      KeyField = 'ID'
      ListField = 'FIO'
      ListSource = dscControlers
      ParentFont = False
      TabOrder = 2
      Visible = True
    end
    object dbCbPlan: TDBComboBoxEh
      Left = 144
      Top = 84
      Width = 57
      Height = 19
      AlwaysShowBorder = True
      EditButtons = <>
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      Flat = True
      Items.Strings = (
        #1076#1072
        #1085#1077#1090)
      KeyItems.Strings = (
        '0'
        '1')
      ParentFont = False
      TabOrder = 3
      Visible = False
    end
  end
  inherited ActionList1: TActionList
    Top = 6
    inherited aSave: TAction
      OnExecute = aSaveExecute
    end
    inherited aCancel: TAction
      OnExecute = aCancelExecute
    end
  end
  inherited PropStorage: TPropStorageEh
    Active = False
  end
  object dsServName: TpFIBDataSet
    UpdateRecordTypes = [cusUnmodified]
    SelectSQL.Strings = (
      'select s.name as service_name, a.address'
      'from dogovors d,services s, v_abons a'
      'where d.id = :dogovor_id'
      '  and s.id = d.service_id'
      '  and a.id = d.abonent_id')
    AutoCalcFields = False
    AllowedUpdateKinds = []
    Transaction = trMeter
    Database = MAINDM.pMainDatabase
    Left = 154
    Top = 38
  end
  object dscServName: TDataSource
    DataSet = dsServName
    Left = 189
    Top = 38
  end
  object dsMeterTypes: TpFIBDataSet
    UpdateRecordTypes = [cusUnmodified]
    SelectSQL.Strings = (
      'select id, name, coalesce(precis,0) as precis,'
      '       power(10,capacity) as capacity'
      '  from meter_types mt'
      '  where coalesce(:pdogovor_id, 0) = 0'
      '     or not exists (select 1 from meter_types2service)'
      
        '     or exists (select 1 from dogovors d, services s, meter_type' +
        's2service mts'
      '        where d.id = :pdogovor_id and d.service_id = s.id'
      
        '          and s.group_id = mts.group_id and mts.meter_type = mt.' +
        'id)'
      '')
    AutoCalcFields = False
    AfterScroll = dsMeterTypesAfterScroll
    BeforeOpen = dsMeterTypesBeforeOpen
    AllowedUpdateKinds = []
    Transaction = trMeter
    Database = MAINDM.pMainDatabase
    Left = 154
    Top = 70
    object dsMeterTypesID: TFIBIntegerField
      FieldName = 'ID'
    end
    object dsMeterTypesNAME: TFIBStringField
      FieldName = 'NAME'
      Size = 16
      EmptyStrToNull = True
    end
    object dsMeterTypesPRECIS: TFIBIntegerField
      FieldName = 'PRECIS'
    end
    object dsMeterTypesCAPACITY: TFIBFloatField
      FieldName = 'CAPACITY'
    end
  end
  object dscMeterTypes: TDataSource
    DataSet = dsMeterTypes
    Left = 189
    Top = 70
  end
  object dsControlers: TpFIBDataSet
    UpdateRecordTypes = [cusUnmodified]
    SelectSQL.Strings = (
      'select id, fio from rcontrolers where status <> 0')
    AutoCalcFields = False
    AllowedUpdateKinds = []
    Transaction = trMeter
    Database = MAINDM.pMainDatabase
    Left = 154
    Top = 102
    object dsControlersID: TFIBIntegerField
      FieldName = 'ID'
    end
    object dsControlersFIO: TFIBStringField
      FieldName = 'FIO'
      Size = 120
      EmptyStrToNull = True
    end
  end
  object dscControlers: TDataSource
    DataSet = dsControlers
    Left = 189
    Top = 102
  end
  object trMeter: TpFIBTransaction
    DefaultDatabase = MAINDM.pMainDatabase
    TimeoutAction = TARollback
    Left = 190
    Top = 6
  end
  object qNewMeter: TpFIBQuery
    Transaction = trMeter
    Database = MAINDM.pMainDatabase
    SQL.Strings = (
      'EXECUTE PROCEDURE PROC_METER_MOUNT'
      '(:PDOGOVOR_ID,'
      '    :PACCPOINT_ID,'
      '    :PMETER_TYPE,'
      '    :PMETER_NUM,'
      '    :PMOUNT_DATE,'
      '    :PMOUNT_IND,'
      '    :PMANFDATE,'
      '    :PCONTROLER_ID,'
      '    :PACTNO,'
      '    :PVERIFY_DATE,'
      '    :PNOTE,'
      '    :PK_TRANS,'
      '    :PNAME,'
      '    :PDIRECTION)')
    Left = 244
    Top = 154
  end
  object dsMeterNameList: TpFIBDataSet
    UpdateRecordTypes = [cusUnmodified]
    SelectSQL.Strings = (
      'select trim(m.name) as name'
      'from meters m, m_accpoint ma, m_accpoint_type mt'
      'where m.name is not null'
      '  and ma.id = m.accpoint_id'
      '  and ma.account_type = mt.id'
      
        '  and mt.group_acc = (select mt1.group_acc from m_accpoint ma1, ' +
        'm_accpoint_type mt1'
      
        '                      where ma1.id = :paccpoint_id and mt1.id = ' +
        'ma1.account_type)'
      'group by 1'
      'having count(1) > 2'
      'order by count(1) desc')
    AutoCalcFields = False
    AllowedUpdateKinds = []
    Transaction = trMeter
    Database = MAINDM.pMainDatabase
    Left = 154
    Top = 134
    object dsMeterNameListNAME: TFIBStringField
      FieldName = 'NAME'
      Size = 60
      EmptyStrToNull = True
    end
  end
  object dscMeterNameList: TDataSource
    DataSet = dsMeterNameList
    Left = 189
    Top = 134
  end
end
